home *** CD-ROM | disk | FTP | other *** search
/ Interactive Quarterly / The Best of New Machine Publishing 1 - Disc 4: Interactive Quarterly.iso / pc / demos / az / cyberx.dxr / 00257_CONTROL NIVEL SONIDO.ls < prev    next >
Encoding:
Text File  |  1996-10-06  |  741 b   |  30 lines

  1. on mouseDown
  2.   puppetSound("volum")
  3.   cursor(200)
  4.   repeat while the mouseDown
  5.     if (the mouseH < 377) and (the mouseH > 323) then
  6.       puppetSprite(8, 1)
  7.       set the locH of sprite 8 to the mouseH
  8.       updateStage()
  9.     else
  10.       if the mouseH > 377 then
  11.         set the locH of sprite 8 to 377
  12.         updateStage()
  13.       else
  14.         if the mouseH < 323 then
  15.           set the locH of sprite 8 to 323
  16.           updateStage()
  17.         end if
  18.       end if
  19.     end if
  20.     set the volume of sound 1 to integer((the locH of sprite 8 - 323) * (float(256) / float(54)))
  21.   end repeat
  22. end
  23.  
  24. on mouseUp
  25.   global niv_sonido1
  26.   puppetSound(0)
  27.   cursor(0)
  28.   set niv_sonido1 to integer((the locH of sprite 8 - 323) * (float(256) / float(54)))
  29. end
  30.